package com.dongdongshop.service.impl;

import com.dongdongshop.mapper.TbAddressMapper;
import com.dongdongshop.mapper.TbAreasMapper;
import com.dongdongshop.pojo.TbAddress;
import com.dongdongshop.pojo.TbAddressExample;
import com.dongdongshop.pojo.TbAreas;
import com.dongdongshop.pojo.TbAreasExample;
import com.dongdongshop.service.AreasService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@DubboService
public class AreasServiceImpl implements AreasService {
    @Autowired
    private TbAreasMapper tbAreasMapper;

    @Override
    public List<TbAreas> selectBycityid(String cityid) {
        TbAreasExample example = new TbAreasExample();
        TbAreasExample.Criteria criteria = example.createCriteria();
        criteria.andCityidEqualTo(cityid);
        return tbAreasMapper.selectByExample(example);
    }

}
